package com.vic.sb18;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

import java.util.function.Predicate;

/**
 * @author victor
 */
public class MyImportSelector implements ImportSelector {
    
    @Override
    public String[] selectImports(AnnotationMetadata annotationMetadata) {
        return new String[]{"com.vic.sb18.Car"};
    }

    @Override
    public Predicate<String> getExclusionFilter() {
        Predicate<String> predicate = new Predicate<String>() {
            @Override
            public boolean test(String s) {
                if (s.matches("com.vic.sb18.Car")) {
                    return true;
                }
                return false;
            }
        };
        return predicate;
    }
}
